﻿<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet  version="1.0"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:are="http://wwwinfo.mfcr.czhttp://wwwinfo.mfcr.cz/ares/xml_doc/schemas/ares/ares_request_orrg/v_1.0.0" xml:space="default">

	

	<xsl:template match="are:Ares_dotazy">
		<Error_list>
		
		<xsl:variable name="lnAtCount"><xsl:value-of select="@dotaz_pocet"/></xsl:variable>
		<xsl:variable name="lnReCount"><xsl:value-of select="count(Dotaz)"/></xsl:variable>
		<xsl:if test="not($lnAtCount=$lnReCount)">
			<Error>
			<Error_type>global</Error_type>
			<Error_ID>1</Error_ID>
			<Error_text>Nesouhlasí počet položek v atributu  dotaz_pocet  a počet elementů Dotaz</Error_text>
			</Error>
		</xsl:if>
		
		</Error_list>

	</xsl:template>            
      
 </xsl:stylesheet>
